import Vue from 'vue'
import Router from 'vue-router'
// 加载导入组件
import Son from './Son'
import Son2 from "./Son2";
import Son3 from "./Son3";
import Fu from "./Fu";
import FuSon from "./FuSon";
Vue.use(Router)

export default new Router({
  routes: [ // 配置路由,设置路径和组件之间的关联
    {
      path:'/hahaha/:world', // 设置/根目录  localhost:8080/hahaha
      name:'Son',
      component:Son
    },
    {
      path:'/Son2', // 设置/根目录  localhost:8080/Son2
      name:'Son2',
      component:Son2
    },
    {
      path:'/Son3', // 设置/根目录  localhost:8080/Son2
      name:'Son3',
      component:Son3
    },
    {
      path:'/Fu', // 设置/根目录  localhost:8080/Son2
      name:'Fu',
      component:Fu,
      children:[ //二级路径
        {
          path:'FuSon',
          name:'FuSon',
          component:FuSon

        }
      ]
    }

  ],
  mode:"history"
})
